Skip to content

Implement TriggerPool State Observation Service#81

Merged
DivineThreepwood merged 15 commits intodevfrom
bugfix/#79_implement_trigger_pool_state_observation_service
Nov 29, 2022
Merged

Implement TriggerPool State Observation Service#81
DivineThreepwood merged 15 commits intodevfrom
bugfix/#79_implement_trigger_pool_state_observation_service

Conversation

@DivineThreepwood
Copy link
Copy Markdown
Member

@DivineThreepwood DivineThreepwood commented Nov 8, 2022

📜 Description

Changes proposed in this pull request:

  • convert dal/remote/trigger to kotlin
  • fix some interruption handling.
  • integrate new jul StateObservationService in agents.
  • re enable agent tests.
  • Make agent tests run again by fixing constructor deadlock

}
}

override fun verifyCondition(

Check warning

Code scanning / detekt

One method should have one responsibility. Long methods tend to handle many things at once. Prefer smaller methods to make them easier to understand.

The function verifyCondition is too long (91). The maximum length is 60.
}
}

override fun verifyCondition(

Check warning

Code scanning / detekt

Prefer splitting up complex methods into smaller, easier to understand methods.

The function verifyCondition appears to be too complex (19). Defined complexity threshold for methods is set to '15'
)
)
}
} catch (ex: Exception) {

Check warning

Code scanning / detekt

Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled.

Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled.
private val targetState: STE,
private val serviceType: ServiceTemplateType.ServiceTemplate.ServiceType
) : AbstractTrigger() {
protected val LOGGER = LoggerFactory.getLogger(javaClass)

Check warning

Code scanning / detekt

Variable names should follow the naming convention set in the projects configuration.

Variable names should match the pattern: [a-z][A-Za-z0-9]*
import org.openbase.jul.pattern.controller.Remote
import org.openbase.jul.pattern.provider.DataProvider
import org.openbase.jul.pattern.trigger.AbstractTrigger
import org.openbase.type.domotic.state.*

Check warning

Code scanning / detekt

Wildcard imports should be replaced with imports using fully qualified class names. Wildcard imports can lead to naming conflicts. A library update can introduce naming clashes with your classes which results in compilation errors.

org.openbase.type.domotic.state.* is a wildcard import. Replace it with fully qualified imports.
private val connectionRemote: ConnectionRemote
) : AbstractTrigger() {
private val locationObserver: Observer<DataProvider<LocationDataType.LocationData>, LocationDataType.LocationData>
private val connectionObserver: Observer<DataProvider<ConnectionDataType.ConnectionData>, ConnectionDataType.ConnectionData>

Check warning

Code scanning / detekt

Line detected that is longer than the defined maximum line length in the code style.

Line detected that is longer than the defined maximum line length in the code style.

private fun verifyCondition() {
try {
if (locationRemote.data.presenceState.value == PresenceStateType.PresenceState.State.PRESENT && connectionRemote.doorState.value == DoorStateType.DoorState.State.OPEN || connectionRemote.windowState.value == WindowStateType.WindowState.State.OPEN) {

Check warning

Code scanning / detekt

Line detected that is longer than the defined maximum line length in the code style.

Line detected that is longer than the defined maximum line length in the code style.
Copy link
Copy Markdown
Contributor

@pLeminoq pLeminoq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request so that I will see diffs from this state in the future.

lhuxohl
lhuxohl previously approved these changes Nov 29, 2022
@lhuxohl lhuxohl dismissed pLeminoq’s stale review November 29, 2022 20:23

Already reviewed.

@DivineThreepwood DivineThreepwood merged commit 18ee16d into dev Nov 29, 2022
@DivineThreepwood DivineThreepwood deleted the bugfix/#79_implement_trigger_pool_state_observation_service branch November 29, 2022 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants